import { ref,reactive} from 'vue'

import type {FormRules } from "element-plus";


//添加修改用户信息
export interface RoleSaveOrUpdateParam {
    roleName:string,
    roleSort:number,
    roleRemarks:string,
    menuIds:[]
}


//添加修改对象
export const roleSaveOrUpdateParam = reactive<RoleSaveOrUpdateParam>({
    roleName: '',
    roleSort: 0,
    roleRemarks: '',
    menuIds: []
});




export function RoleFromInfo(fromObj:any){
    roleSaveOrUpdateParam.roleName=fromObj!=null?fromObj.roleName:"";
    roleSaveOrUpdateParam.roleSort=fromObj!=null?fromObj.roleSort:0;
    roleSaveOrUpdateParam.roleRemarks=fromObj!=null?fromObj.roleRemarks:"";
    roleSaveOrUpdateParam.menuIds=fromObj!=null?fromObj.menuIds: [];
}
